<?php

/**
 * Created by Reliese Model.
 * Date: Thu, 21 Sep 2017 02:03:25 +0000.
 */

namespace App\Models;

use Reliese\Database\Eloquent\Model as Eloquent;

/**
 * Class QdcsArticle
 * 
 * @property int $id
 * @property string $title
 * @property string $subhead
 * @property string $img
 * @property string $content
 * @property int $cls_id
 * @property string $editer
 * @property string $src
 * @property bool $is_top
 * @property bool $is_hot
 * @property string $keyword
 * @property string $description
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 *
 * @package App\Models
 */
class QdcsArticle extends Eloquent
{
	protected $table = 'qdcs_article';

	protected $casts = [
		'cls_id' => 'int',
		'is_top' => 'bool',
		'is_hot' => 'bool'
	];

	protected $fillable = [
		'title',
		'subhead',
		'img',
		'content',
		'cls_id',
		'editer',
		'src',
		'is_top',
		'is_hot',
		'keyword',
		'description'
	];

	public function qdcsClass(){
	    return $this->hasOne(QdcsClass::class , 'id' , 'cls_id');
    }
}
